#include <iostream>

class Base
{
public:
    Base(){ a++; };
    static int a;
};

int Base::a = 0;

class Derived : public Base
{
public:
    Derived(){ a++; };
};

int main()
{
    Base a;
    Base b;
    Derived c;
    Base d;
    std::cout << Base::a << std::endl;

    return 0;
}
